<template>
  <div>
    <el-descriptions class="margin-top" title="个人信息" :column="2" :size="size" border>
    <el-descriptions-item>
      <template slot="label">
        <i class="el-icon-user"></i>
        用户名
      </template>
      {{ userDTO.username }}
    </el-descriptions-item>
    <el-descriptions-item title="shshsh ">
      <template slot="label">
        <i class="el-icon-mobile-phone"></i>
        手机号
      </template>
      {{ userDTO.phone }}
    </el-descriptions-item>
    <el-descriptions-item>
      <template slot="label">
        <i class="el-icon-location-outline"></i>
        车牌号
      </template>
      {{ carDTO.carNum }}
    </el-descriptions-item>
    <el-descriptions-item>
      <template slot="label">
        <i class="el-icon-tickets"></i>
        账户余额
      </template>
      {{userDTO.balance}}
    </el-descriptions-item>
    <el-descriptions-item>
      <template slot="label">
        <i class="el-icon-office-building"></i>
        联系地址
      </template>
       {{ carDTO.address }}
    </el-descriptions-item>
  </el-descriptions>
  </div>
</template>

<script>
import { mapState } from 'vuex'
export default {
  name:'UserInfo',
  data() {
    return {
      size:'medium '
    }
  },
  mounted(){

  },
  computed:{
    ...mapState(['userDTO','carDTO']),
  }
}
</script>

<style>
.margin-top{
  float: right;
  width: 85%;
}
</style>